<?php include "../public/header.php"?>
<?php include "../public/header_public.php"?>
<body class="laytp-container">
<div style="height: 45px"></div>
<div id="opt_nav">
</div>
<div id="dialog">
    <div class="page-title" id="page-title">
        <div class="page-title-con">
            <span class="title">选择项目信息</span>
            <div class="move_title"></div>
            <div class="page-title-opt-list">
                <button class="layui-btn layui-btn-sm btn-dark marginr5" type="button" id="submit">确定</button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
</div>


<div class="layui-card" id="search-form">
    <div class="layui-card-body">
        <form class="layui-form" id="TableSearchFormId" lay-filter="TableSearchForm" onkeydown="keyTableSearch('TableSearchForm', 'datalist')">
            <div class="layui-form-item">
                <div class="layui-row">
                    <div class="layui-col-md3">
                        <label class="layui-form-label">项目名称</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" placeholder="请输入" class="layui-input" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-col-md3">
                        <label class="layui-form-label">项目编号</label>
                        <div class="layui-input-block">
                            <input type="text" name="number" placeholder="请输入" class="layui-input" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-col-md3">
                        <label class="layui-form-label">项目类型</label>
                        <div class="layui-input-block">
                            <div id="engintype" class="xmselect_div">
                                <div class="xmselect_title">请选择</div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">招标方/建设单位</label>
                        <div class="layui-input-block">
                            <input type="text" name="jian_unit" placeholder="请输入" class="layui-input" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">项目所在地</label>
                        <div class="layui-input-block">
                            <input type="text" name="areas" placeholder="请输入" class="layui-input" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">招标方式</label>
                        <div class="layui-input-block">
                            <div id="zhaotype" class="xmselect_div">
                                <div class="xmselect_title">请选择</div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">资质要求</label>
                        <div class="layui-input-block">
                            <input type="text" name="ziyao" placeholder="请输入" class="layui-input" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">项目属性：</label>
                        <div class="layui-input-block">
                            <select id="business" name="business" lay-filter="business">
                                <option value="">请选择</option>
                                <option value="1">自营</option>
                                <option value="2">联营</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">联营方/委托方</label>
                        <div class="layui-input-block">
                            <input type="text" name="lian_unit" placeholder="请输入" class="layui-input" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">项目概况</label>
                        <div class="layui-input-block">
                            <input type="text" name="kuang" placeholder="请输入" class="layui-input" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">招标代理机构</label>
                        <div class="layui-input-block">
                            <input type="text" name="zhao_unit" placeholder="请输入" class="layui-input" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">项目状态：</label>
                        <div class="layui-input-block">
                            <select id="state" name="state" lay-filter="state">
                                <option value="">请选择</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">所属单位</label>
                        <div class="layui-input-block">
                            <div id="chanid" class="xmselect_div">
                                <div class="xmselect_title">请选择</div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">实际开工日期</label>
                        <div class="layui-input-block">
                            <input type="text" name="shikaidt" placeholder="请输入" autocomplete="off" class="layui-input bdate_sea_range_ymd">
                        </div>
                    </div>
                    <div class="layui-col-md3 search_hide none">
                        <label class="layui-form-label">竣工验收日期</label>
                        <div class="layui-input-block">
                            <input type="text" name="shijundt" placeholder="请输入" autocomplete="off" class="layui-input bdate_sea_range_ymd">
                        </div>
                    </div>
                    <div class="layui-col-md3">
                        <div class="layui-form-item search-div">
                            <div class="layui-form-item layui-inline">
                                <button class="laytp-btn laytp-btn-md laytp-btn-primary" id="TableSearchButton" type="button"><i class="layui-icon layui-icon-search"></i>查询</button>
                                <button class="layui-btn layui-btn-primary" onclick="listTableReset()" id="TableSearchReset" type="reset" ><i class="layui-icon layui-icon-refresh"></i>重置</button>
                                <div id="search_open" onclick="toggle_search()">
                                    <i class="layui-icon layui-icon-down"></i>展开
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>

<div class="layui-card" id="table-card">
    <div class="layui-card-body">
        <div class="layui-row">
            <div class="layui-col-md12" id="table_list">
                <div class="layui-card-body">
                    <table id="datalist" lay-filter="datalist"></table>
                </div>
            </div>
        </div>
    </div>
</div>

<script type="text/javascript">
    // 单选多选分类 默认单选 choose_type传值为多选
    var choose_type = getQueryVariable('choose_type');
    if(choose_type === undefined || choose_type === false){
        choose_type = 'radio';
    }else{
        choose_type = 'checkbox';
    }

    // 用证专用
    var use_type = getQueryVariable('use_type');
    if(use_type === undefined || use_type === false){
        use_type = '';
    }
    var apply_type = getQueryVariable('apply_type');
    if(apply_type === undefined || apply_type === false){
        apply_type = '';
    }


    var parent_dom = getQueryVariable('dom');
    var parent_page = getQueryVariable('page');
    var parent_business = getQueryVariable('business') || '';
    var parent_isgodanno = getQueryVariable('isgodanno') || 0;

    layui.use(['laytp','table','form','soulTable'], function () {
        var table = layui.table, form = layui.form, soulTable = layui.soulTable;

        $('#TableSearchReset').click(function () {
            $('.xmselect_div>xm-select').find('.xm-label-block').css('display','none');
            $('.xmselect_div').append('<div class="xmselect_title">请选择</div>');
            searchTableFunc(form, table)
        });

        $("#cols_table").hide();
        $("#export_table").hide();
        table.render({
            elem: "#datalist",id: "datalist"
            ,url: facade.url(ask_opt_get_engin),where: {use_type: use_type, apply_type: apply_type,isgodanno:parent_isgodanno, business:parent_business}, page: true, height: 'full-140'
            ,soulSort: TabInit.soulSort,method: TabInit.method, toolbar: TabInit.toolbar, overflow: TabInit.overflow
            ,defaultToolbar: ['', '', ''],filter: TabInit.filter
            ,request: TabInit.request,response: TabInit.response,contextmenu:get_table_contextmenu(soulTable)
            ,parseData: function(res){
                xmselect_dan('engintype', res.data.engintype, res.data.is_engintype, function (res) {
                    setTimeout(function () {
                        searchTableFunc(form, table);
                    },100)
                })
                xmselect_dan('zhaotype', res.data.zhaotype, res.data.is_zhaotype, function (res) {
                    setTimeout(function () {
                        searchTableFunc(form, table);
                    },100)
                })



                var state_str = '<option value="">请选择</option>';
                var state = res.data.state;
                for (var key in state){
                    if(res.data.is_state == key){
                        state_str += '<option value="'+key+'" selected>'+state[key]+'</option>';
                    }else {
                        state_str += '<option value="'+key+'">'+state[key]+'</option>';
                    }

                }
                $("#state").html(state_str);


                xmselect_dan('chanid', res.data.chanid, res.data.is_chanid, function (res) {
                    setTimeout(function () {
                        searchTableFunc(form, table);
                    },100)
                })


                render_from();
                return {
                    "code": res.code,
                    "msg": res.message,
                    "count": res.data.data.total,
                    "data": res.data.data.data
                };
            }
            ,cols: [[
                {type:choose_type,fixed:'left'}
                ,{type:'numbers',title:'序号',fixed:'left'}
                ,{field: 'state_name', title: '项目状态'}
                ,{field:'name',title:'项目名称',templet: function(d){
                        return '<span class="colorlan" onclick="openPage(\'../engin/show.php?id='+d.id+'\')">'+d.name+'</span>';
                    }}
                ,{field: 'number', title: '项目编号'}
                ,{field: 'engintype_name', title: '项目类型'}
                ,{field: 'chanid_name', title: '所属单位'}
                ,{field: 'jian_unit', title: '招标方/建设单位'}
                ,{field: 'areas', title: '项目所在地'}
                ,{field: 'addr', title: '项目地址'}
                ,{field: 'zhaotype_name', title: '招标方式'}
                ,{field: 'ziyao', title: '资质要求'}
                ,{field: 'business_name', title: '项目属性'}
                ,{field: 'lian_unit', title: '联营方/委托方'}
                ,{field: 'kuang', title: '项目概况'}
                ,{field: 'shikaidt', title: '实际开工日期'}
                ,{field: 'shijundt', title: '竣工验收日期'}
            ]]
            ,done : function(res, curr, count){
                $(".layui-table-tool").remove()
                soulTable.render(this);
            }
        });
        listTableSearch(form, table);


        $('#submit').on('click', function () {
            var checkStatus = layui.table.checkStatus('datalist');
            var data = checkStatus.data;
            if(data.length < 1){
                facade.error("请选择数据");return false;
            }

            if(parent_page === '页面值'){

            }else if(parent_page === 'cert_use'){
                var str = '<button type="button"' +
                    'class="layui-btn layui-btn-sm btn-dark" key="'+data[0].id+'"><span class="choose_content">'+data[0].name+'' +
                    '</span><span class="choose_close" onclick="choose_close(this, \''+parent_dom+'\')">×</span></button>';

                $("#"+parent_dom , parent.document).html(str);
                parent.formValid(parent_dom);

                $("#engin_state" , parent.document).val(data[0].state_name);

                var placeArr = parent.placeArr;
                var cert_list = data[0].cert_use;
                var cert_str = '';
                for(var key in cert_list){
                    cert_str += '<tr>';
                    cert_str += '<td style="width: 45px;">'+(key+1)+'</td>';
                    cert_str += '<td><select class="layui-select place">';
                    str += '<option value="">请选择</option>';
                    for (var mmm in placeArr) {
                        if(cert_list[key].place == placeArr[mmm]){
                            cert_str += '<option value="'+placeArr[mmm]+'" selected>'+placeArr[mmm]+'</option>';
                        }else{
                            cert_str += '<option value="'+placeArr[mmm]+'">'+placeArr[mmm]+'</option>';
                        }
                    }
                    cert_str += '</select></td>';
                    cert_str += '<td><input type="text" onclick="check_cert_one(this)" certid="'+cert_list[key].certid+'" readonly value="'+cert_list[key].name+'" class="layui-input disabled name"></td>';
                    cert_str += '<td><input type="text" class="layui-input numberss disabled" readonly value="'+cert_list[key].number+'"></td>';
                    cert_str += '<td><input type="text" class="layui-input major_name disabled" readonly value="'+cert_list[key].major_name+'"></td>';
                    cert_str += '<td><input type="text" class="layui-input person_name disabled" readonly value="'+cert_list[key].person_name+'"></td>';
                    cert_str += '<td><input type="text" class="layui-input statueuse disabled" readonly value="'+cert_list[key].statueuse+'"></td>';
                    cert_str += '<td><input type="text" class="layui-input chanid_name disabled" readonly value="'+cert_list[key].chanid_name+'"></td>';

                    cert_str += '<td><select class="layui-select issuo">';
                    if(cert_list[key].issuo == '是'){
                        cert_str += '<option value="是" selected>是</option>';
                        cert_str += '<option value="否">否</option>';
                    }else{
                        cert_str += '<option value="是">是</option>';
                        cert_str += '<option value="否" selected>否</option>';
                    }
                    cert_str += '</select></td>';
                    cert_str += '<td><input type="text" class="layui-input startdt bdate_ymd"  value="'+cert_list[key].startdt+'"></td>';
                    cert_str += '<td><input type="text" class="layui-input yudt bdate_ymd"   value="'+cert_list[key].yudt+'"></td>';
                    cert_str += '<td><input type="text" class="layui-input enddt bdate_ymd"  value="'+cert_list[key].enddt+'"></td>';

                    cert_str += '<td><select class="layui-select opt">';
                    if(cert_list[key].opt > 0){
                        cert_str += '<option value="1" selected>启用</option>';
                        cert_str += '<option value="0">停用</option>';
                    }else{
                        cert_str += '<option value="1">启用</option>';
                        cert_str += '<option value="0" selected>停用</option>';
                    }
                    cert_str += '</select></td>';
                    cert_str += '</tr>';
                }
                $("#list_list" , parent.document).append(cert_str);
                parent.render_date();
                parent.render_from();
            }else{
                var str = '<button type="button"' +
                    'class="layui-btn layui-btn-sm btn-dark" key="'+data[0].id+'"><span class="choose_content">'+data[0].name+'' +
                    '</span><span class="choose_close" onclick="choose_close(this, \''+parent_dom+'\')">×</span></button>';
                $("#"+parent_dom , parent.document).html(str);
                parent.formValid(parent_dom);

                if(parent_page === 'shou_tou'){
                    $("#duier" , parent.document).html('');
                    if(data[0].lian_unit){
                        var duier_str = '<button type="button" class="layui-btn layui-btn-sm btn-dark" key="'+data[0].lian_unit+'"><span class="choose_content">'+data[0].lian_unit+'' +
                            '</span><span class="choose_close" onclick="choose_close(this, \'duier\')">×</span></button>';
                        $("#duier" , parent.document).html(duier_str);
                        parent.formValid('duier');
                    }
                }
                if(parent_page === 'engin_visa'){
                    if(data[0].shiinfo){
                        $("#rate" , parent.document).val(data[0].shiinfo.rate);
                    }
                }

                if(parent_page == 'contract_shi'){
                    $("#name" , parent.document).val(data[0].name);
                    $("#money" , parent.document).val(data[0].winfee);
                    parent.jisuan_money();
                }

                if(parent_page === 'contract_bu'){
                    $("#shiid" , parent.document).html('');
                    if(data[0].shiinfo){
                        var shi_str = '<button type="button"' +
                            'class="layui-btn layui-btn-sm btn-dark" key="'+data[0].shiinfo.id+'"><span class="choose_content">'+data[0].shiinfo.name+'' +
                            '</span><span class="choose_close" onclick="choose_close(this, \'shiid\')">×</span></button>';
                        $("#shiid", parent.document).html(shi_str);
                        parent.formValid("shiid");

                        $("#shi_number" , parent.document).val(data[0].shiinfo.number);
                        $("#shi_money" , parent.document).val(data[0].shiinfo.money);
                        $("#shi_rate" , parent.document).val(data[0].shiinfo.rate);
                        $("#name" , parent.document).val(data[0].shiinfo.name+'补充合同');
                    }
                }
                if(parent_page === 'contract_shi_jie'){
                    $("#shiid" , parent.document).html('');
                    if(data[0].shiinfo){
                        var shi_str = '<button type="button"' +
                            'class="layui-btn layui-btn-sm btn-dark" key="'+data[0].shiinfo.id+'"><span class="choose_content">'+data[0].shiinfo.name+'' +
                            '</span><span class="choose_close" onclick="choose_close(this, \'shiid\')">×</span></button>';
                        $("#shiid", parent.document).html(shi_str);
                        parent.formValid("shiid");

                        $("#shijiemoney" , parent.document).val(data[0].shijiemoney);
                    }
                }
                if(parent_page === 'shou_xiang'){
                    if(data[0].business == 2){
                        $(".business2", parent.document).removeClass('layui-hide');
                        var daikouallfee = parseFloat(parseFloat(data[0].dai_guanfee)+parseFloat(data[0].dai_shuifee)+parseFloat(data[0].daikouqidaifee)).toFixed(2);
                        $("#daikouallfee" , parent.document).val(daikouallfee);
                        $("#lian_guanrate" , parent.document).val(data[0].lian_guanrate);
                    }else{
                        $(".business2", parent.document).addClass('layui-hide');
                    }
                    $("#business" , parent.document).val(data[0].business);
                    $("#duier" , parent.document).html('');
                    if(data[0].shiinfo){
                        var duier_str = '<button type="button" class="layui-btn layui-btn-sm btn-dark" key="'+data[0].shiinfo.faer+'"><span class="choose_content">'+data[0].shiinfo.faer+'' +
                            '</span><span class="choose_close" onclick="choose_close(this, \'duier\')">×</span></button>';
                        $("#duier" , parent.document).html(duier_str);
                        parent.formValid('duier');
                    }

                    if (typeof(window.parent.update_refresh_row_func)!="undefined"){
                        window.parent.update_refresh_row_func();
                    }
                    if (typeof(window.parent.set_right_relainfo)!="undefined"){
                        window.parent.set_right_relainfo(data[0]);
                    }
                }
                if(parent_page === 'piao_kai'){
                    if(data[0].business == 2){
                        $(".buisness2", parent.document).removeClass('layui-hide');
                    }else{
                        $(".buisness2", parent.document).addClass('layui-hide');
                    }

                    $("#business" , parent.document).val(data[0].business);
                    $("#lian_shuirate" , parent.document).val(data[0].lian_shuirate);
                    $("#shiid" , parent.document).html('');
                    $("#shouer" , parent.document).html('');
                    if(data[0].shiinfo){
                        // var shi_str = '<button type="button"' +
                        //     'class="layui-btn layui-btn-sm btn-dark" key="'+data[0].shiinfo.id+'"><span class="choose_content">'+data[0].shiinfo.name+'' +
                        //     '</span><span class="choose_close" onclick="choose_close(this, \'shiid\')">×</span></button>';
                        // $("#shiid", parent.document).html(shi_str);
                        // parent.formValid("shiid");
                        //
                        // $("#kaifee" , parent.document).val(data[0].shiinfo.kaifee);

                        var shouer_str = '<button type="button" class="layui-btn layui-btn-sm btn-dark" key="'+data[0].shiinfo.faer+'"><span class="choose_content">'+data[0].shiinfo.faer+'' +
                            '</span><span class="choose_close" onclick="choose_close(this, \'shouer\')">×</span></button>';
                        $("#shouer" , parent.document).html(shouer_str);
                        parent.formValid('shouer');

                        if(data[0].shiinfo.faer_info){
                            $("#ratenum" , parent.document).val(data[0].shiinfo.faer_info.ratenum);
                            $("#unitbkname" , parent.document).val(data[0].shiinfo.faer_info.unitbkname);
                            $("#unitbknum" , parent.document).val(data[0].shiinfo.faer_info.unitbknum);
                            $("#unitaddr" , parent.document).val(data[0].shiinfo.faer_info.unitaddr);
                            $("#unittel" , parent.document).val(data[0].shiinfo.faer_info.unittel);
                        }

                        if(data[0].shiinfo.chenger_info){
                            parent.tan_tags_init('#kaier', data[0].shiinfo.chenger_info);
                        }
                    }
                    if (typeof(window.parent.set_right_relainfo)!="undefined"){
                        window.parent.set_right_relainfo(data[0]);
                    }
                }

                if(parent_page == 'engin_budbian'){
                    $("#budgetid" , parent.document).html('');
                    if(data[0].budgetinfo){
                        var budgetid_str = '<button type="button"' +
                            'class="layui-btn layui-btn-sm btn-dark" key="'+data[0].budgetinfo.id+'"><span class="choose_content">'+data[0].budgetinfo.title+'' +
                            '</span><span class="choose_close" onclick="choose_close(this, \'budgetid\')">×</span></button>';
                        $("#budgetid", parent.document).html(budgetid_str);
                        parent.formValid("budgetid");

                        $("#budget_number" , parent.document).val(data[0].budgetinfo.number);
                    }
                }

                if(parent_page == 'contract_cai'){
                    if(data[0].budgetinfo){
                        $("#caiDiv" , parent.document).attr('budgetid', data[0].budgetinfo.id);
                        if (typeof(window.parent.set_list_layout)!="undefined"){
                            window.parent.set_list_layout();
                        }
                    }
                }
                if(parent_page == 'contract_bian'){
                    if(data[0].budgetinfo){
                        $("#caiDiv" , parent.document).attr('budgetid', data[0].budgetinfo.id);
                        if (typeof(window.parent.set_list_layout)!="undefined"){
                            window.parent.set_list_layout();
                        }
                    }
                }
                if(parent_page == 'piao_shou'){
                    $("#shouer" , parent.document).val('');
                    if(data[0].shiinfo){
                        if(data[0].shiinfo.chenger_info){
                            $("#shouer" , parent.document).val(data[0].shiinfo.chenger_info[0].name);
                        }
                    }
                }
                if(parent_page == 'contract_lian'){
                    $("#lian_unit" , parent.document).val(data[0].lian_unit);
                }
                if(parent_page == 'zhi_jintui'){
                    $("#kou_shuifee" , parent.document).val(data[0].kou_shuifee);
                    $("#shou_money" , parent.document).val(data[0].shou_money);
                    $("#shou_ratefee_zhuan" , parent.document).val(data[0].shou_ratefee_zhuan);
                    $("#zhijintuifee" , parent.document).val(data[0].zhijintuifee);
                    $("#shengjintuifee" , parent.document).val(data[0].shengjintuifee);
                    parent.initParseMoney();
                }
                if(parent_page == 'zhi_lianjie'){
                    $("#shougonghuifee" , parent.document).val(data[0].shougonghuifee);
                    $("#shoulianbeifee" , parent.document).val(data[0].shoulianbeifee);
                    $("#lianyingshoufee" , parent.document).val(data[0].lianyingshoufee);
                    $("#zhixiangfee" , parent.document).val(data[0].zhixiangfee);
                    $("#zhilianjiefee" , parent.document).val(data[0].zhilianjiefee);
                    $("#lianyingzhifee" , parent.document).val(data[0].lianyingzhifee);
                    $("#kou_allfee" , parent.document).val(data[0].kou_allfee);
                    $("#balancefee2" , parent.document).val(data[0].balancefee);
                    $("#dai_guanfee" , parent.document).val(data[0].dai_guanfee);
                    $("#dai_shuifee" , parent.document).val(data[0].dai_shuifee);
                    $("#daikouqidaifee" , parent.document).val(data[0].daikouqidaifee);

                    $("#balancefee" , parent.document).val(data[0].balancefee);

                    if (typeof(window.parent.update_refresh_row_func)!="undefined"){
                        window.parent.update_refresh_row_func();
                    }
                    if (typeof(window.parent.set_right_relainfo)!="undefined"){
                        window.parent.set_right_relainfo(data[0]);
                    }
                }
                if(parent_page == 'zhi_xiang'){
                    if (typeof(window.parent.set_right_relainfo)!="undefined"){
                       var xx_enginid = parent.get_choose_val('enginid');
                       var xx_duier = parent.get_choose_val('duier');
                        window.parent.set_right_relainfo(xx_enginid, xx_duier);
                    }
                }

                if(parent_page == 'speed_month'){
                    $("#list_list", parent.document).html('');
                }
                if(parent_page == 'engin_speed'){
                    $("#monthid", parent.document).html('');
                    $("#list_list", parent.document).html('');
                }
                if(parent_page == 'zhi_enbao'){
                    $("#myjieyufee", parent.document).val(data[0].myjieyufee);
                }
                if(parent_page == 'bond_shou'){
                    $("#duier" , parent.document).html('');
                    if(data[0].lian_unit){
                        var duier_str = '<button type="button" class="layui-btn layui-btn-sm btn-dark" key="'+data[0].lian_unit+'"><span class="choose_content">'+data[0].lian_unit+'' +
                            '</span><span class="choose_close" onclick="choose_close(this, \'duier\')">×</span></button>';
                        $("#duier" , parent.document).html(duier_str);
                        parent.formValid('duier');
                    }
                }
                if(parent_page == 'bond_jiao'){
                    $("#business", parent.document).val(data[0].business);
                    if(data[0].business == 2){
                        $(".business2", parent.document).removeClass('layui-hide');
                    }else{
                        $(".business2", parent.document).addClass('layui-hide');
                    }
                }

            }

            layer_close();
        });

    });
</script>
</body>
</html>
